﻿Imports System.Reflection
Imports SQLite

Namespace SqlTable
    Public Class TradeList '交易记录
        Public Property StockCode As String '股票代码
        Public Property TradeDate As String '交易日期
        Public Property Price As Double '金额
        Public Property Volume As Integer '数量
        Public Property Amount As Double '合计金额
        Public Property AmountRange As Integer '金额范围
        '
        Public Sub New()
        End Sub
        '
        Public Sub New(ByVal StockCode As String, ByVal TradeDate As String, ByVal Price As Double, ByVal Volume As Integer)
            Me.StockCode = StockCode
            Me.TradeDate = TradeDate
            'Me.Price = Price
            'Me.Volume = Volume
            Me.Amount = Price * Volume
            Me.AmountRange = CalculateAmountRange(Me.Amount)
        End Sub
    End Class
    Public Class TradeSummary '交易记录
        Public Property StockCode As String '股票代码
        Public Property TradeDate As String '交易日期
        Public Property TotalAmount As Double '合计金额
        Public Property AmountRange As Integer '金额范围
        '
        Public Sub New()
        End Sub
        '
        Public Sub New(ByVal StockCode As String, ByVal TradeDate As String, ByVal TotalAmount As Double, ByVal AmountRange As Integer)
            Me.StockCode = StockCode
            Me.TradeDate = TradeDate
            'Me.Price = Price
            'Me.Volume = Volume
            Me.TotalAmount = TotalAmount
            Me.AmountRange = AmountRange
        End Sub
    End Class
    Public Class DailyStats '日记录
        Public Property StockCode As String '股票代码
        Public Property TradeDate As String '交易日期
        Public Property CLostPrice As Double '金额
        Public Property TotalAmount As Double '合计金额
        '
        Public Sub New()
        End Sub
        '
        Public Sub New(ByVal StockCode As String, ByVal TradeDate As String, ByVal Price As Double, Optional ByVal TotalAmount As Double = 0)
            Me.StockCode = StockCode
            Me.TradeDate = TradeDate
            Me.CLostPrice = Price
            Me.TotalAmount = TotalAmount
        End Sub
    End Class
    Public Class StockBlock '股票板块
        Public Property StockCode As String '股票代码
        Public Property StockName As String '股票代码
        Public Property BlockName As String '交易日期
        '
        Public Sub New()
        End Sub
        '
        Public Sub New(ByVal StockCode As String, ByVal StockName As String, ByVal BlockName As String)
            Me.StockCode = StockCode
            Me.StockName = StockName
            Me.BlockName = BlockName
        End Sub
    End Class
    Public Class AmountRangeList '股票金额范围明细
        Public Property RangeName As String '范围名称
        Public Property RangeMin As Integer '范围符号
        Public Property RangeMax As Integer '范围符号
        '
        Public Sub New()
        End Sub
        '
        Public Sub New(ByVal RangeName As String, ByVal RangeMin As Integer, ByVal RangeMax As Integer)
            Me.RangeName = RangeName
            Me.RangeMin = RangeMin
            Me.RangeMax = RangeMax
        End Sub
    End Class

    Public Class StockRangeSummary '股票区域内均值
        Public Property StockCode As String '股票代码
        Public Property TradeDate As String '交易日期
        Public Property RangeName As String '范围名称
        Public Property RangeTotalAmount As Double '范围内合计金额
        Public Property StockTotalAmount As Double '股票合计金额
        Public Property RangeRate As Double '范围占比
    End Class

    Public Class BlockRangeSummary '板块均值
        Public Property BlockName As String '板块名称
        Public Property TradeDate As String '交易日期
        Public Property RangeName As String '范围名称
        Public Property RangeRate As Double '范围占比
    End Class

    Public Class dateRange '板块均值
        Public Property MinDate As DateTime '开始日期
        Public Property MaxDate As DateTime '结束日期
        '
        Public Sub New()
        End Sub
        '
        Public Sub New(ByVal MinDate As DateTime, ByVal MaxDate As DateTime)
            Me.MinDate = MinDate
            Me.MaxDate = MaxDate
        End Sub
    End Class
End Namespace

